import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class GrowTransition extends StatelessWidget {
  GrowTransition({Key key, @required this.child, @required this.animation})
      : super(key: key);

  final Widget child;
  final Animation<double> animation;

  @override
  Widget build(BuildContext context) {
    return AnimatedBuilder(
      animation: animation,
      builder: (context, child) {
        return Container(
          width: animation.value,
          height: animation.value,
          child: child,
        );
      },
      child: child,
    );
  }
}
